]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tests: Stop using Gtk.PolicyType
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 12 Apr 2023 13:20:42 +0000 (15:20 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 7 Jun 2023 11:12:40 +0000 (11:12 +0000)
St got its own enum type years ago, so use that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2733>

tests/interactive/scroll-view-sizing.js
tests/interactive/scrolling.js
tests/testcommon/ui.js

index a6c682e54620aca7ca6b4239ee2fa583f7112376..be929a4f4ce422d86f4b0079dafee3bcddebcbb9 100644 (file)
@@ -2,7 +2,7 @@
 
 const UI = imports.testcommon.ui;
 
-const { Clutter, GObject, Gtk, Shell, St } = imports.gi;
+const {Clutter, GObject, Shell, St} = imports.gi;
 
 // This is an interactive test of the sizing behavior of StScrollView. It
 // may be interesting in the future to split out the two classes at the
@@ -299,7 +299,7 @@ function test() {
            button.label = 'AUTOMATIC';
            break;
         }
-        scrollView.set_policy(Gtk.PolicyType[hpolicy.label], Gtk.PolicyType[vpolicy.label]);
+        scrollView.set_policy(St.PolicyType[hpolicy.label], St.PolicyType[vpolicy.label]);
     }
 
     hpolicy.connect('clicked', () => { togglePolicy(hpolicy); });
index 91951ce10aef0654f772afb547b97b8ea0ca65e6..ab526f97e526b8c05d9c47e461501f16905d36ae 100644 (file)
@@ -2,7 +2,7 @@
 
 const UI = imports.testcommon.ui;
 
-const { Clutter, Gtk, St } = imports.gi;
+const {Clutter, St} = imports.gi;
 
 function test() {
     let stage = new Clutter.Stage();
@@ -22,9 +22,9 @@ function test() {
     vbox.add(v, { expand: true });
 
     toggle.connect('notify::checked', () => {
-        v.set_policy(toggle.checked ? Gtk.PolicyType.AUTOMATIC
-                     : Gtk.PolicyType.NEVER,
-                     Gtk.PolicyType.AUTOMATIC);
+        v.set_policy(toggle.checked ? St.PolicyType.AUTOMATIC
+                     : St.PolicyType.NEVER,
+                     St.PolicyType.AUTOMATIC);
     });
 
     let b = new St.BoxLayout({ vertical: true,
index abacea5f7677728905a0b37e067e680dd7ddc0b1..d426c0b38ef52304236dda285dd1f32bf638acb4 100644 (file)
@@ -2,7 +2,7 @@
 
 const Config = imports.misc.config;
 
-imports.gi.versions = { Clutter: Config.LIBMUTTER_API_VERSION, Gtk: '3.0' };
+imports.gi.versions = {Clutter: Config.LIBMUTTER_API_VERSION};
 
 const { Clutter, Gio, GLib, St } = imports.gi;